Skip to content

fix(plugins): expand ${env:*} and ${userHome} placeholders in plugin mcpServers#404

Open
Gucc111 wants to merge 1 commit into
OpenBMB:mainfrom
Gucc111:fix/plugin-mcp-placeholder-expansion
Open

fix(plugins): expand ${env:*} and ${userHome} placeholders in plugin mcpServers#404
Gucc111 wants to merge 1 commit into
OpenBMB:mainfrom
Gucc111:fix/plugin-mcp-placeholder-expansion

Conversation

@Gucc111

@Gucc111 Gucc111 commented Jul 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Extract shared placeholder expansion helper (expandMcpString / expandMcpConfig) into src/mcp/config/expandPlaceholders.ts
  • Apply full placeholder expansion (${env:*}, ${userHome}, ~) to plugin manifest mcpServers fields: args, cwd, env, url, and headers
  • Refactor loadMcpServerConfig.ts to reuse the shared helper instead of local inline functions

Test plan

  • 12 new unit tests covering all expansion scenarios (stdio env, cwd, args; HTTP url, headers; consistency with user config)
  • Existing McpClient tests pass without regression
  • TypeScript compiles with zero errors

Fixes #245

Made with Cursor

…mcpServers

Plugin manifest mcpServers only expanded ~ in args, leaving ${env:*} and
${userHome} as literal strings in cwd, env, url, and headers fields.
Extract a shared expandMcpString helper and apply it uniformly to both
user config and plugin manifest MCP server declarations.

Closes OpenBMB#245

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(plugins): plugin mcpServers only expand ~ in args and leave env/userHome placeholders literal

1 participant